<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>思维脑图</title>
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<link rel="shortcut icon" href="image/favicon.png">
		<!-- bower:css -->
		<link rel="stylesheet" href="kityminder/bootstrap/bootstrap.css">
		<link rel="stylesheet" href="kityminder/codemirror/lib/codemirror.css">
		<link rel="stylesheet" href="kityminder/hotbox/hotbox.css">
		<link rel="stylesheet" href="kityminder/kityminder-core/kityminder.core.css">
		<link rel="stylesheet" href="kityminder/color-picker/color-picker.css">
		<!-- endbower -->
		<link rel="stylesheet" href="kityminder/kityminder.editor.css">
		<link rel="stylesheet" href="css/index.css">
		<link rel="stylesheet" href="css/switch.css">
	</head>
	<body ng-app="kityminderContainer" ng-controller="MainController" class="ng-scope">
		<kityminder-editor on-init="initEditor(editor, minder)"></kityminder-editor>

		<div id="mainContainer">
			<h1 class="editor-title">
				<a href="https://github.com/fex-team/kityminder" target="_blank" class="x-a-high">
					<img src="image/favicon.png" style="width: 33px;" alt="百度脑图">kityminder fex
				</a>：脑图工具
				<span class="x-tips" @click="loadUnSaved" v-html="naotuTips" ref="tipsBar"></span>
				<span class="x-toolbox">
					<a href="#" @click="loginButton" class="x-tool">{{ loginTitle }}</a>
					<span class="x-line">|</span>
					<a href="#" @click="newNaotu" class="x-tool">新建</a>
					<span class="x-line">|</span>
					<a href="#" @click="saveNaotu" class="x-tool">保存</a>
					<span class="x-line">|</span>
					<!-- <a href="#" @click="importNaotu" class="x-tool">导入</a>
					<span class="x-line">|</span> -->
					<a href="#" @click="exportNaotu('png','current')" class="x-tool">导出图片</a>
					<span class="x-line">|</span>
					<!-- <a href="#" @click="exportNaotu('json','current')" class="x-tool">导出Json</a>
					<span class="x-line">|</span> -->
					<a href="#" @click="myNaotu(true)" class="x-tool">{{ myNaotuButton }}</a>
				</span>
			</h1>

			<div class="my-naotu-list scroll" v-show="showSavedNaotuList">
				<!--<span class="x-toolbox">
					<a href="#" @click="exportNaotu('json','all')" class="x-tool">全部导出为JSON</a>
					<span class="x-line">|</span>
					<a href="#" @click="myNaotu(true)" class="x-tool">关闭</a>
				</span> -->
				<table class="table table-bordered table-hover table-condensed">
					<thead>
						<tr>
							<th>序号</th>
							<th>标题</th>
							<!-- <th>作者</th> -->
							<th>创建时间</th>
							<th>最近更新</th>
							<th class="th-op">操作</th>
							<th>分享</th>
						</tr>
					</thead>
					<tbody>
						<tr v-for="(naotu,index) in mySavedNaotuList" :key="naotu.id">
							<td>{{index+1}}</td>
							<td>{{naotu.title}}</td>
							<!-- <td>{{naotu.createBy}}</td> -->
							<td>{{ dateFormat(naotu.createdAt) }}</td>
							<td>{{ dateFormat(naotu.updatedAt) }}</td>
							<td>
								<button class="btn btn-xs btn-success" @click="editNaotu(naotu.id)">编辑</button>&nbsp
								<button class="btn btn-xs btn-warning" @click="deleteNaotu(naotu.id,naotu.title)">删除</button>
							</td>
							<td>
								<label class="switch">
									<input type="checkbox" :checked="naotu.mapShare.shared" @click="check($event,naotu.mapShare.shareId)">
									<div class="slider round"></div>
								</label>
								<button class="btn btn-xs btn-info" :disabled="!naotu.mapShare.shared" @click="alert(naotu.mapShare.shareId)">分享链接</button>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</body>

	<script type="text/javascript" src="js/vue.global.js"></script>
	<!-- bower:js -->
	<script src="kityminder/jquery/jquery.js"></script>
	<script src="kityminder/bootstrap/bootstrap.js"></script>
	<script src="kityminder/angular/angular.js"></script>
	<script src="kityminder/angular-bootstrap/ui-bootstrap-tpls.js"></script>
	<script src="kityminder/codemirror/lib/codemirror.js"></script>
	<script src="kityminder/codemirror/mode/xml/xml.js"></script>
	<script src="kityminder/codemirror/mode/javascript/javascript.js"></script>
	<script src="kityminder/codemirror/mode/css/css.js"></script>
	<script src="kityminder/codemirror/mode/htmlmixed/htmlmixed.js"></script>
	<script src="kityminder/codemirror/mode/markdown/markdown.js"></script>
	<script src="kityminder/codemirror/addon/mode/overlay.js"></script>
	<script src="kityminder/codemirror/mode/gfm/gfm.js"></script>
	<script src="kityminder/angular-ui-codemirror/ui-codemirror.js"></script>
	<script src="kityminder/marked/marked.js"></script>
	<script src="kityminder/kity/kity.js"></script>
	<script src="kityminder/hotbox/hotbox.js"></script>
	<script src="kityminder/json-diff/json-diff.js"></script>
	<script src="kityminder/kityminder-core/kityminder.core.js"></script>
	<script src="kityminder/color-picker/color-picker.js"></script>
	<!-- endbower -->
	<script type="text/javascript" src="kityminder/kityminder.editor.js"></script>
	<script type="text/javascript" src="js/index.js"></script>
</html>
